package com.icode.core.model.house;

import com.icode.core.model.AbstractEntity;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: sunk
 * Date: 15-1-13
 * Time: 上午10:21
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "house_base_image")
public class HouseBaseImage extends AbstractEntity {

    @ManyToOne
    @JoinColumn(name = "house_base_id")
    private HouseBase houseBase;


    @ManyToOne(cascade = CascadeType.ALL)
    @JoinColumn(name = "image_id")
    private UploadImage houseBaseImages;

    public HouseBaseImage() {
    }

    public HouseBaseImage(HouseBase houseBase, UploadImage houseBaseImages) {
        this.houseBase = houseBase;
        this.houseBaseImages = houseBaseImages;
    }

    public HouseBase houseBase() {
        return houseBase;
    }

    public UploadImage uploadImage() {
        return houseBaseImages;
    }
}
